
<#include "header.ftl">
  <!-- 内容区域 -->
<div class="tpl-content-wrapper">

   <div class="container-fluid am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                        
                    </div>
                    <div class="am-u-lg-3 tpl-index-settings-button">
                        <a href="#"><button type="button" class="page-header-button"><span class="am-icon-reply-all"></span> 返回</button></a>
                    </div>
                </div>
</div>
  <div class="row-content am-cf">
  
  

          <div class="row">

                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">${survey.name}</div>
                                
                            </div>
                            <div class="widget-body am-fr">
								
								<div class="am-form-group">
                                    	  患者：${patient.name}  (${patient.SimpleNo()})
                                        
                                    </div>
                                    <div class="am-form-group">
                                    	  性别：${patient.gender} &nbsp;&nbsp;&nbsp;&nbsp; 年龄 ${patient.Age()}
                                    </div>
                                    <hr>
								
								   <div class="am-progress-title">完成进度<span class="am-fr am-progress-title-more">${access.speed} / ${access.total}</span></div>
                                <div class="am-progress" style="height:20px">
								  <div class="am-progress-bar am-progress-bar-success" style="width: ${access.speed*100/access.total}%"></div>
								</div>
                               
                            </div>
                        </div>
                    </div>
                </div>
        
         
        
            
   </div>
</div>        
<script type="text/javascript" src="${Domain}common/js/jquery.form.min.js"></script> 
<script type="text/javascript">
  var loading; 
$(function() {
  
  $('#iask').validator({
    onValid: function(validity) {   
      $(validity.field).closest('.am-form-group').find('.am-alert').hide();
    },
    onInValid: function(validity) {
   
      var $field = $(validity.field);
      var $group = $field.closest('.am-form-group');
      var $tpl = $group.find('.tpl-form-input');
      var $alert = $group.find('.am-alert');
      // 使用自定义的提示信息 或 插件内置的提示信息
      var msg = $tpl.data('validationMessage') || this.getValidationMessage(validity);
      if (!$alert.length) {
        $alert = $('<div class="am-alert am-alert-danger"></div>').hide().
          insertAfter($tpl);
      }

      $alert.html(msg).show();
    }
  });
});
  
  
   $('#iask').ajaxForm({
	    beforeSubmit: function(a,f,o) {
	        loading=weui.loading('数据加载中...');
	    },
	    success: function(json) {	    	
	    	if(json.status)
	    	{
	    	  	if(loading)loading.hide();
	    		weui.toast(json.msg); 
	    		location.href="${Domain}my/access/ask/${access.id}";	
	    		
	    	}else
	    	{	
	    		if(loading)loading.hide();
	    	    weui.alert(json.msg);  		 
	    	}
	    }
	});
	</script>
<#include "footer.ftl">